package cn.huiyunche.admin.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.huiyunche.base.service.interfaces.CAccntTurnOverService;
import cn.huiyunche.base.service.model.CTurnover;
import cn.huiyunche.base.service.vo.PageVo;
import cn.huiyunche.base.service.vo.Result;

/**
 * 账户账单流水管理
 * @author lm
 *
 */
@RequestMapping("/details")
@Controller
public class AccntTurnoverController {
	
	private static final Logger log = LoggerFactory.getLogger(AccntTurnoverController.class);
	
	@Autowired
	private CAccntTurnOverService cAccntTurnOverService = null;
	
	public CAccntTurnOverService getCAccntTurnOverService(){
		return this.cAccntTurnOverService;
	}
	
	/**
	 * 账单流水记录
	 * @param page
	 * @return
	 */
	@RequestMapping(value = "/list", method = RequestMethod.GET)
	@ResponseBody
	public Result<Object> getDriverBills(PageVo page, CTurnover cTurnover){
		log.info("select details controller.");
		Result<Object> result = new Result<Object>(true, null, "数据加载成功");
		result.setData(this.getCAccntTurnOverService().getDetails(page, cTurnover, null, null, 0));
		return result;
	}
	
}
